package com.chongaizhen.local.transactional.controller;

import com.chongaizhen.local.transactional.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @GetMapping("test-transactional")
    public void testTransactional() {

        studentService.testTransactional();

        System.out.println("end");
    }

}
